package com.jwds.digital.bios.business.api.controller.belt;

import com.jwds.digital.bios.business.core.infrastructure.dto.belt.BeltRouteTaskBeltMainReqDTO;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltRouteTaskBeltMainRespVO;
import com.jwds.digital.bios.business.service.service.belt.IBeltRouteTaskBeltMainService;
import com.jwds.tdc.framework.application.lib.BaseResponse;
import com.jwds.tdc.framework.application.lib.page.PageRequest;
import com.jwds.tdc.framework.application.lib.page.PageResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 路线作业实绩皮带主表 前端控制器
 * @author: 秦伟烽
 * @Date: 2024/12/16
 */
@Slf4j
@Api(tags = "路线作业实绩皮带主表--接口")
@RestController
@RequestMapping("/belt/route/task/belt/main")
public class BeltRouteTaskBeltMainController {

    @Resource
    private IBeltRouteTaskBeltMainService service;

    @PostMapping("/list")
    @ApiOperation(value = "分页查询")
    public BaseResponse<PageResponse<BeltRouteTaskBeltMainRespVO>> page(@Valid @RequestBody PageRequest<BeltRouteTaskBeltMainReqDTO> pageRequest) {
        PageResponse<BeltRouteTaskBeltMainRespVO> respVoPage = service.page(pageRequest);
        return BaseResponse.success(respVoPage);
    }
}
